<template>
    <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
        <el-menu-item index="1">用户是买家</el-menu-item>

        <el-menu-item index="3">用户是卖家</el-menu-item>
    </el-menu>
    <div>
        <Buy v-show="activeIndex === '1'" />
        <Sell v-show="activeIndex === '3'" />
    </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue';
import Buy from "./component/Buy.vue";
import Sell from './component/Sell.vue'
const activeIndex = ref("1");

const handleSelect = (index) => {
    activeIndex.value = index;
}

</script>


<style scoped lang="less">

</style>